import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner console = new Scanner(System.in);
        Main main = new Main();
        int number = console.nextInt();
        System.out.println(main.palindromeNumber(number));
    }
    //前后指针判断是否是回文数
    public Boolean palindromeNumber(int number) {
//把数字转化成字符串
        String str=String.valueOf(number);
        int leftIdx=0;
        int rightIdx=str.length()-1;

        while(leftIdx<rightIdx){

            if(str.charAt(leftIdx)!=str.charAt(rightIdx)){
                return false;
            }
            leftIdx++;
            rightIdx--;
        }
        return true;

    }
}